package ncme.auto.framework.test.permission.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.Version;
import ncme.auto.framework.core.annotation.entity.Primary;
import ncme.auto.framework.core.annotation.entity.Secondary;
import ncme.auto.framework.core.annotation.entity.VerifyMultiRepetitionField;

import java.util.Date;

@TableName("permission_rolepermission_mapper")
public class RolepermissionMapper {

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @Primary
    @VerifyMultiRepetitionField
    private Integer roleId;

    @Secondary
    @VerifyMultiRepetitionField
    private Integer permissionId;

    @TableLogic
    private Date isDeleted;

    @Version
    private Integer version;

    public Integer getId() { return id; }

    public void setId(Integer id) { this.id = id; }

    public Integer getRoleId() { return roleId; }

    public void setRoleId(Integer roleId) { this.roleId = roleId; }

    public Integer getPermissionId() { return permissionId; }

    public void setPermissionId(Integer permissionId) { this.permissionId = permissionId; }

    public Date getIsDeleted() { return isDeleted; }

    public void setIsDeleted(Date isDeleted) { this.isDeleted = isDeleted; }

    public Integer getVersion() { return version; }

    public void setVersion(Integer version) { this.version = version; }

    @Override
    public String toString() {
    return "rolepermissionMapper{" +
            "id=" + id +
            ", roleId=" + roleId +
            ", permissionId=" + permissionId +
            ", isDeleted=" + isDeleted +
            ", version=" + version +
            '}';
    }

}
